﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace proyecto
{
    /// <summary>
    /// Lógica de interacción para Design_histogram.xaml
    /// </summary>
    public partial class Design_histogram : UserControl
    {
        int nSeries;


        public Design_histogram()
        {
            InitializeComponent();
        }

        public Design_histogram(string[] Columns, int nColumns, string[][] groups, int[] nGroups, int nClass)
        {
            InitializeComponent();

            for (int i = 0; i < nColumns; i++)
            {
                comboBox1.Items.Add(Columns[i]);
                comboBox2.Items.Add(Columns[i]);
            }

            comboBox3.Items.Add("All groups");

            for (int i = 0; i < nClass; i++)
            {
                for (int j = 0; j < nGroups[i]; j++)
                {
                    comboBox3.Items.Add(groups[i][j]);
                }
                
            }

            nSeries = 1;
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
        
            ComboBox combo = new ComboBox();
            for (int i = 0; i < comboBox3.Items.Count; i++)
            {
                combo.Items.Add(comboBox3.Items[i]);
            }

            DockPanel.SetDock(combo, Dock.Top);

            combo.Width = 250;
            combo.Height = 23;
            dockPanel6.Children.Add(combo);


            nSeries++;



        }



        



    }
}
